In detection of a target image, template matching is commonly adopted, e.g., feature extraction and matching is performed on the target image to be detected with a template. However, in practice, a pose of the target image to be detected tends to be different from that of a template image to some extent. For example, the target image is rotated by a certain angle with respect to the template image. Therefore, it is necessary for a detection algorithm to have a relatively strong rotational invariance, and a direction of the target image is adjusted by determining a rotation angle of the target image; afterwards, the feature extraction and matching is performed on the target image. However, the detection algorithm is relatively complicated, and the image identification has a relatively low reliability.